// 统一管理项目 用户模块相关的接口
import request from '@/utils/request.ts'
import type { loginForm, loginResponseData, userInfoResponseData } from './type'
// 统一管理接口
enum API {
  LOGIN_URL = '/admin/acl/index/login',
  USERINFO_URL = '/admin/acl/index/info',
  LOGOUT_URL = '/admin/acl/index/logout',
}
// 对外暴露请求函数
export const reqLogin = (data: loginForm) =>
  request.post<loginResponseData>(API.LOGIN_URL, data)
export const reqUserInfo = () =>
  request.get<userInfoResponseData>(API.USERINFO_URL)

export const reqLogout = () => request.post<any>(API.LOGOUT_URL)
